#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn =1e5+1000;
typedef long long LL;
LL du[maxn];
int main(void){
    LL n,s;cin>>n>>s;
    for(LL i=1;i<n;i++){
        LL x,y;cin>>x>>y;
        du[x]++;du[y]++;
    }
    LL ans=0;
    for(LL i=1;i<=n;i++){
        if(du[i]==1){
            ans++;
        }
    }

    printf("%.10f\n",1.0*s/(1.0*ans)*2.0);
}
